package com.xunwulian.base.constant;

import com.xunwulian.base.util.EnumType;

public enum CmebErrorCode implements EnumType<CmebErrorCode, Integer, String> {

    E0(0, "正确"),
    E1(1, "数据库错误"),
    E2(2, "数据库无记录"),
    E3(3, "订购关系鉴权不通过"),
    E4(4, "应用状态不正常"),
    E6(6, "IP地址鉴权不通过"),
    E7(7, "Token鉴权不通过"),
    E8(8, "白名单鉴权不通过"),
    E10(10, "请求参数个数不正确"),
    E11(11, "号码没有归属省份"),
    E12(12, "MSISDN号不是所查询的集团下的用户"),
    E13(13, "请求参数命名不规范"),
    E14(14, "日期参数格式不正确"),
    E18(18, "卡号数量超出限制范围"),
    E19(19, "查询时间超出限制范围"),
    E20(20, "数据文件还未生成"),
    E21(21, "查询号码全部非法"),
    E71(71, "已超出 API 最大流控限制"),
    E72(72, "已超出订购关系最大流控限制"),
    E99(99, "APIname 调用，系统错误"),
    E100(100, "短信重置刷新失败"),
    E101(101, "通信失败"),
    E102(102, "通信获取系统参数失败"),
    E200(200, "号卡余额查询通信异常"),
    E195(118040195, "其他错误"),
    E196(118040196, "业务权限校验失败"),
    E260(118030260, "用户{0}不存在"),
    E232(118032232, "IP{0}格式不正确"),
    E478(118030478, "系统错误，{0}"),
    E1000(1000, "网络错误");

    public Integer role;
    public String desc;

    CmebErrorCode(int role, String desc) {
        this.role = role;
        this.desc = desc;
    }

    @Override
    public Integer getType() {
        return this.role;
    }

    @Override
    public String getDesc() {
        return this.desc;
    }


}
